package stack

type simpleStack struct {
	items []interface{}
}

func (s *simpleStack) Size() int {
	return len(s.items)
}

func (s *simpleStack) IsEmpty() bool {
	return len(s.items) == 0
}

func (s *simpleStack) Pop() interface{} {
	item := s.items[len(s.items)-1]
	s.items = s.items[:len(s.items)-1]
	return item
}

func (s *simpleStack) Push(item interface{}) {
	s.items = append(s.items, item)
}
